package com.fishery.monitor.pojo;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * <p>
 * 
 * </p>
 *
 * @author 711
 * @since 2021-01-24
 */
@TableName("t_monitor_water_data")
@ApiModel(value="MonitorWaterData对象", description="")
public class WaterData implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "id")
    @TableId(value = "id", type = IdType.ID_WORKER_STR)
    private String id;

    @ApiModelProperty(value = "基地id")
    @TableField("baseId")
    private String baseId;

    @ApiModelProperty(value = "水质设备编号")
    @TableField("equipmentId")
    private String equipmentId;

    @ApiModelProperty(value = "溶解氧")
    @TableField("dissolvedOxygen")
    private Double dissolvedOxygen;

    @ApiModelProperty(value = "%")
    @TableField("dissolvedOxygenUnit")
    private String dissolvedOxygenUnit;

    @ApiModelProperty(value = "水温")
    @TableField("waterTemperature")
    private Double waterTemperature;

    @ApiModelProperty(value = "℃")
    @TableField("waterTemperatureUnit")
    private String waterTemperatureUnit;

    @ApiModelProperty(value = "PH值")
    @TableField("phValue")
    private Double phValue;

    @ApiModelProperty(value = "pH")
    @TableField("phValueUnit")
    private String phValueUnit;

    @ApiModelProperty(value = "氨氮")
    @TableField("ammoniaNitrogen")
    private Double ammoniaNitrogen;

    @ApiModelProperty(value = "%")
    @TableField("ammoniaNitrogenUnit")
    private String ammoniaNitrogenUnit;

    @ApiModelProperty(value = "电导率")
    private Double conductivity;

    @ApiModelProperty(value = "(μS/cm)")
    @TableField("conductivityUnit")
    private String conductivityUnit;

    @ApiModelProperty(value = "浊度")
    private Double turbidity;

    @ApiModelProperty(value = "NTU")
    @TableField("turbidityUnit")
    private String turbidityUnit;

    @ApiModelProperty(value = "高猛酸盐指数")
    @TableField("permanganateIndex")
    private Double permanganateIndex;

    @ApiModelProperty(value = "mg/L")
    @TableField("permanganateIndexUnit")
    private String permanganateIndexUnit;

    @ApiModelProperty(value = "总磷")
    private Double phosphorus;

    @ApiModelProperty(value = "mg/L")
    @TableField("phosphorusUnit")
    private String phosphorusUnit;

    @ApiModelProperty(value = "总氮")
    private Double nitrogen;

    @ApiModelProperty(value = "mg/L")
    @TableField("nitrogenUnit")
    private String nitrogenUnit;

    @ApiModelProperty(value = "叶绿素α")
    private Double chlorophyll;

    @ApiModelProperty(value = "mg/L")
    @TableField("chlorophyllUnit")
    private String chlorophyllUnit;

    @ApiModelProperty(value = "藻密度")
    @TableField("algalDensity")
    private Double algalDensity;

    @ApiModelProperty(value = "cells/L")
    @TableField("algalDensityUnit")
    private String algalDensityUnit;

    @ApiModelProperty(value = "水位")
    @TableField("waterLevel")
    private Double waterLevel;

    @ApiModelProperty(value = "m")
    @TableField("waterLevelUnit")
    private String waterLevelUnit;

    @ApiModelProperty(value = "压力传感器状态（0）：关（1）：开")
    @TableField("pressureSensorStatus")
    private String pressureSensorStatus;

    @ApiModelProperty(value = "浮球阀状态（0）：关（1）：开")
    @TableField("floatValveStatus")
    private String floatValveStatus;

    @ApiModelProperty(value = "水质传感器工作状态0（关闭）1（工作中）2（故障）")
    @TableField("waterQualityWorking")
    private String waterQualityWorking;

    @ApiModelProperty(value = "上报的时间")
    @TableField("updateTime")
    private Date updateTime;

    @ApiModelProperty(value = "采集的时间")
    @TableField("acquisitionTime")
    private Date acquisitionTime;

    @ApiModelProperty(value = "备用字段1")
    private String spare1;

    @ApiModelProperty(value = "备用字段2")
    private String spare2;


    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getBaseId() {
        return baseId;
    }

    public void setBaseId(String baseId) {
        this.baseId = baseId;
    }

    public String getEquipmentId() {
        return equipmentId;
    }

    public void setEquipmentId(String equipmentId) {
        this.equipmentId = equipmentId;
    }

    public Double getDissolvedOxygen() {
        return dissolvedOxygen;
    }

    public void setDissolvedOxygen(Double dissolvedOxygen) {
        this.dissolvedOxygen = dissolvedOxygen;
    }

    public String getDissolvedOxygenUnit() {
        return dissolvedOxygenUnit;
    }

    public void setDissolvedOxygenUnit(String dissolvedOxygenUnit) {
        this.dissolvedOxygenUnit = dissolvedOxygenUnit;
    }

    public Double getWaterTemperature() {
        return waterTemperature;
    }

    public void setWaterTemperature(Double waterTemperature) {
        this.waterTemperature = waterTemperature;
    }

    public String getWaterTemperatureUnit() {
        return waterTemperatureUnit;
    }

    public void setWaterTemperatureUnit(String waterTemperatureUnit) {
        this.waterTemperatureUnit = waterTemperatureUnit;
    }

    public Double getPhValue() {
        return phValue;
    }

    public void setPhValue(Double phValue) {
        this.phValue = phValue;
    }

    public String getPhValueUnit() {
        return phValueUnit;
    }

    public void setPhValueUnit(String phValueUnit) {
        this.phValueUnit = phValueUnit;
    }

    public Double getAmmoniaNitrogen() {
        return ammoniaNitrogen;
    }

    public void setAmmoniaNitrogen(Double ammoniaNitrogen) {
        this.ammoniaNitrogen = ammoniaNitrogen;
    }

    public String getAmmoniaNitrogenUnit() {
        return ammoniaNitrogenUnit;
    }

    public void setAmmoniaNitrogenUnit(String ammoniaNitrogenUnit) {
        this.ammoniaNitrogenUnit = ammoniaNitrogenUnit;
    }

    public Double getConductivity() {
        return conductivity;
    }

    public void setConductivity(Double conductivity) {
        this.conductivity = conductivity;
    }

    public String getConductivityUnit() {
        return conductivityUnit;
    }

    public void setConductivityUnit(String conductivityUnit) {
        this.conductivityUnit = conductivityUnit;
    }

    public Double getTurbidity() {
        return turbidity;
    }

    public void setTurbidity(Double turbidity) {
        this.turbidity = turbidity;
    }

    public String getTurbidityUnit() {
        return turbidityUnit;
    }

    public void setTurbidityUnit(String turbidityUnit) {
        this.turbidityUnit = turbidityUnit;
    }

    public Double getPermanganateIndex() {
        return permanganateIndex;
    }

    public void setPermanganateIndex(Double permanganateIndex) {
        this.permanganateIndex = permanganateIndex;
    }

    public String getPermanganateIndexUnit() {
        return permanganateIndexUnit;
    }

    public void setPermanganateIndexUnit(String permanganateIndexUnit) {
        this.permanganateIndexUnit = permanganateIndexUnit;
    }

    public Double getPhosphorus() {
        return phosphorus;
    }

    public void setPhosphorus(Double phosphorus) {
        this.phosphorus = phosphorus;
    }

    public String getPhosphorusUnit() {
        return phosphorusUnit;
    }

    public void setPhosphorusUnit(String phosphorusUnit) {
        this.phosphorusUnit = phosphorusUnit;
    }

    public Double getNitrogen() {
        return nitrogen;
    }

    public void setNitrogen(Double nitrogen) {
        this.nitrogen = nitrogen;
    }

    public String getNitrogenUnit() {
        return nitrogenUnit;
    }

    public void setNitrogenUnit(String nitrogenUnit) {
        this.nitrogenUnit = nitrogenUnit;
    }

    public Double getChlorophyll() {
        return chlorophyll;
    }

    public void setChlorophyll(Double chlorophyll) {
        this.chlorophyll = chlorophyll;
    }

    public String getChlorophyllUnit() {
        return chlorophyllUnit;
    }

    public void setChlorophyllUnit(String chlorophyllUnit) {
        this.chlorophyllUnit = chlorophyllUnit;
    }

    public Double getAlgalDensity() {
        return algalDensity;
    }

    public void setAlgalDensity(Double algalDensity) {
        this.algalDensity = algalDensity;
    }

    public String getAlgalDensityUnit() {
        return algalDensityUnit;
    }

    public void setAlgalDensityUnit(String algalDensityUnit) {
        this.algalDensityUnit = algalDensityUnit;
    }

    public Double getWaterLevel() {
        return waterLevel;
    }

    public void setWaterLevel(Double waterLevel) {
        this.waterLevel = waterLevel;
    }

    public String getWaterLevelUnit() {
        return waterLevelUnit;
    }

    public void setWaterLevelUnit(String waterLevelUnit) {
        this.waterLevelUnit = waterLevelUnit;
    }

    public String getPressureSensorStatus() {
        return pressureSensorStatus;
    }

    public void setPressureSensorStatus(String pressureSensorStatus) {
        this.pressureSensorStatus = pressureSensorStatus;
    }

    public String getFloatValveStatus() {
        return floatValveStatus;
    }

    public void setFloatValveStatus(String floatValveStatus) {
        this.floatValveStatus = floatValveStatus;
    }

    public String getWaterQualityWorking() {
        return waterQualityWorking;
    }

    public void setWaterQualityWorking(String waterQualityWorking) {
        this.waterQualityWorking = waterQualityWorking;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public Date getAcquisitionTime() {
        return acquisitionTime;
    }

    public void setAcquisitionTime(Date acquisitionTime) {
        this.acquisitionTime = acquisitionTime;
    }

    public String getSpare1() {
        return spare1;
    }

    public void setSpare1(String spare1) {
        this.spare1 = spare1;
    }

    public String getSpare2() {
        return spare2;
    }

    public void setSpare2(String spare2) {
        this.spare2 = spare2;
    }

    @Override
    public String toString() {
        return "MonitorWaterData{" +
        "id=" + id +
        ", baseId=" + baseId +
        ", equipmentId=" + equipmentId +
        ", dissolvedOxygen=" + dissolvedOxygen +
        ", dissolvedOxygenUnit=" + dissolvedOxygenUnit +
        ", waterTemperature=" + waterTemperature +
        ", waterTemperatureUnit=" + waterTemperatureUnit +
        ", phValue=" + phValue +
        ", phValueUnit=" + phValueUnit +
        ", ammoniaNitrogen=" + ammoniaNitrogen +
        ", ammoniaNitrogenUnit=" + ammoniaNitrogenUnit +
        ", conductivity=" + conductivity +
        ", conductivityUnit=" + conductivityUnit +
        ", turbidity=" + turbidity +
        ", turbidityUnit=" + turbidityUnit +
        ", permanganateIndex=" + permanganateIndex +
        ", permanganateIndexUnit=" + permanganateIndexUnit +
        ", phosphorus=" + phosphorus +
        ", phosphorusUnit=" + phosphorusUnit +
        ", nitrogen=" + nitrogen +
        ", nitrogenUnit=" + nitrogenUnit +
        ", chlorophyll=" + chlorophyll +
        ", chlorophyllUnit=" + chlorophyllUnit +
        ", algalDensity=" + algalDensity +
        ", algalDensityUnit=" + algalDensityUnit +
        ", waterLevel=" + waterLevel +
        ", waterLevelUnit=" + waterLevelUnit +
        ", pressureSensorStatus=" + pressureSensorStatus +
        ", floatValveStatus=" + floatValveStatus +
        ", waterQualityWorking=" + waterQualityWorking +
        ", updateTime=" + updateTime +
        ", acquisitionTime=" + acquisitionTime +
        ", spare1=" + spare1 +
        ", spare2=" + spare2 +
        "}";
    }

    public Double getCheckItem(String checkName){
        if(checkName.equals("dissolvedOxygen"))
            return this.dissolvedOxygen;
        if(checkName.equals("waterTemperature"))
            return this.waterTemperature;
        if(checkName.equals("phValue"))
            return this.phValue;
        if(checkName.equals("ammoniaNitrogen"))
            return this.ammoniaNitrogen;
        if(checkName.equals("waterLevel"))
            return this.waterLevel;
        if(checkName.equals("conductivity"))
            return this.conductivity;
        if(checkName.equals("turbidity"))
            return this.turbidity;
        if(checkName.equals("permanganateIndex"))
            return this.permanganateIndex;
        if(checkName.equals("phosphorus"))
            return this.phosphorus;
        if(checkName.equals("nitrogen"))
            return this.nitrogen;
        if(checkName.equals("chlorophyll"))
            return this.chlorophyll;
        if(checkName.equals("algalDensity"))
            return this.algalDensity;

        return 0.0;

    }
}
